#ifndef NODECONTENTNUMBER_H
#define NODECONTENTNUMBER_H

#include <QWidget>
#include<QtGui>
#include<QLineEdit>
#include<QVBoxLayout>
#include<QLabel>
#include <QTextEdit>
#include<QDebug>

#include"item_enum.h"

class NodeContentBase: public QWidget
{
public:
    NodeContentBase(QWidget *parent = nullptr);
    double GetData();
    //void SetData(QString text);
    QVBoxLayout *layout;


};



class NodeContentNumber: public NodeContentBase
{
public:
    NodeContentNumber(QWidget *parent = nullptr);
    double GetData();
    void SetData(QString text);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);

private:
    QLineEdit *edit = new QLineEdit("0",this);

};

class NodeContentOutput: public NodeContentBase
{
public:
    NodeContentOutput(QWidget *parent = nullptr);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);
    double GetData();
    void SetData(QString text);

private:
    QLabel *edit = new QLabel("0",this);

};

class NodeContentAdd: public NodeContentBase
{
public:
    NodeContentAdd(QWidget *parent = nullptr);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);
    double GetData();
    void SetData(QString text);

    NumberData data;

private:
    QLabel *edit = new QLabel("+",this);
};

class NodeContentSub: public NodeContentBase
{
public:
    NodeContentSub(QWidget *parent = nullptr);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);
    double GetData();
    void SetData(QString text);

    NumberData data;

private:
    QLabel *edit = new QLabel("-",this);
};

class NodeContentMul: public NodeContentBase
{
public:
    NodeContentMul(QWidget *parent = nullptr);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);
    double GetData();
    void SetData(QString text);

    NumberData data;

private:
    QLabel *edit = new QLabel("*",this);
};

class NodeContentDiv: public NodeContentBase
{
public:
    NodeContentDiv(QWidget *parent = nullptr);

    NumberData GetNumberData();
    void SetNumberData(NumberData data);
    double GetData();
    void SetData(QString text);

    NumberData data;

private:
    QLabel *edit = new QLabel("/",this);
};


#endif // NODECONTENTNUMBER_H

